﻿using Bricks.Component.Utils;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;

namespace Bricks.Business.Models.Account
{
    [Description("角色/权限组")]
    public class RoleInfo : EntityBase<Guid>
    {
        public RoleInfo()
        {
            ID = GuidHelper.NewGuid();
        }

        [Required]
        [StringLength(32)]
        [Display(Name = "权限组名称")]
        public string RoleName { get; set; }

        [StringLength(64)]
        [Display(Name = "权限组编码")]
        public string RoleCode { get; set; }

        [Display(Name = "排序")]
        public int OrderNo { get; set; }

        [StringLength(1024)]
        [Display(Name = "描述")]
        public string Description { get; set; }

        [Display(Name = "父ID")]
        public Guid? PID { get; set; }

        #region Collection
        //public virtual ICollection<UserInfo> Users { get; set; }
        #endregion
    }
}
